High Efficiency Video Coding (HVEC) uses a quad-tree structure to represent coding units (CUs) and sub-partitions. A CU or a sub-partition is able to be identified by an index represented in three different representations: one-dimensional Z-scanning representation, one-dimensional raster-scanning representation and two-dimensional (x,y) representation. Conversion between a z-scanning representation to a two-dimensional (x,y) representation is quite frequent (e.g. when locating neighboring sub-partitions), and such conversion is usually performed using table lookups.
Typically, at least four lookup tables are used to convert between z-scanning, raster-scanning and two-dimensional (x, y) representations. For example, two for converting between z-scanning and raster-scanning, another two for converting between raster-scanning and (x,y); to convert between z-scanning and (x,y) representation, a two-step table lookup is used. FIG. 1 illustrates tables of data conversion from z-scanning indexes to raster scanning indexes to two-dimensional (x,y) coordinates. In this figure, each table only has 16 entries. However, in HEVC, a typical maximum CU size (64×64) and depth (4) requires 256 entries to be stored for each table. Storage of multiple lookup tables consumes a lot of gates in HW implementations.